package com.infosys.newSimpleInvertedIndex.config;

import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class openApiConfig {
    //config swagger
    @Bean
    public OpenAPI springOpenAPI() {
        return new OpenAPI()
                .info(new Info().title("Employee API")
                        .description("Spring API for employee management system")
                        .version("v0.1")
                        .termsOfService("http://swagger.io/terms/")
                        .license(new License().name("***").url("****"))
                )
                .externalDocs(new ExternalDocumentation()
                        .description("SpringDoc OpenAPI 3.0")
                        .url("https://springdoc.org/")
                );
    }
}
